package com.flx.noodle.websocket.dao;

import com.flx.noodle.websocket.entity.ChatMessage;
import com.flx.noodle.websocket.entity.ChatRoom;

/**
 * Created by fenglixiong on 2017/10/2.
 */
public interface ChatDao {

    /**
     * 通过房间id获取房间
     * @param chatId
     * @return
     */
    ChatRoom getChatRoomById(int chatId);

    /**
     * 找到这个房间此用户的最新一条系统消息
     * @param chatId
     * @param userId
     * @return
     */
    ChatMessage getSystemMsg(int chatId,int userId);

    /**
     * 更新房间信息
     * @param chatRoom
     * @return
     */
    int updateChatRoom(ChatRoom chatRoom);

}
